package com.wurao.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wurao.dao.BloggerDao;
import com.wurao.entity.Blogger;
import com.wurao.entity.Permission;
import com.wurao.entity.Role;
import com.wurao.service.BloggerService;
/**
 * 博主Service实现类
 * @author xxxx
 *
 */
@Service("bloggerService")
public class BloggerServiceImpl implements BloggerService {
	@Resource
	private BloggerDao bloggerDao;
	
	public BloggerDao getBloggerDao() {
		return bloggerDao;
	}

	public void setBloggerDao(BloggerDao bloggerDao) {
		this.bloggerDao = bloggerDao;
	}

	public Blogger getByUserName(String userName) {
		// TODO Auto-generated method stub
		return bloggerDao.getByUserName(userName);
	}

	public Blogger find(Integer id) {
		// TODO Auto-generated method stub
		return bloggerDao.find(id);
	}
	
	@Override
	public Integer update(Blogger blogger) {
		// TODO Auto-generated method stub
		return bloggerDao.update(blogger);
	}
	
	@Override
	public Blogger getByUserOpenId(String openId) {
		// TODO Auto-generated method stub
		return bloggerDao.getByUserOpenId(openId);
	}
	
	@Override
	public Integer add(Blogger blogger) {
		// TODO Auto-generated method stub
		return bloggerDao.add(blogger);
	}

	@Override
	public List<Role> findByBlogger(String userName) {
		// TODO Auto-generated method stub
		return bloggerDao.findByBlogger(userName);
	}

	@Override
	public List<Permission> findPermissionByName(String userName) {
		// TODO Auto-generated method stub
		return bloggerDao.findPermissionByName(userName);
	}
	
	

}
